qui(
	function(require, exports, module){


        PreSet.Dao = $.extend({}, Ancestor.Dao, {
            save: function(data, callback) {
                $.ajax({
                    url:'/live2VOD/preSet/save',
                    dataType: 'json',
                    data: data,
                    method: 'post',
                    success: function(data) {
                        callback.call(this, data);
                    },
                    error: function(data) {
                        callback.call(this, data);
                    }
                });
            },

            del: function(data, callback) {
                var url = PreSet.Constant.preSetApi + "/modify";
                $.ajax({
                    url: url,
                    type: 'POST',
                    data: data,
                    dataType: 'json',
                    success: function(data) {
                        callback.call(this, data);
                    },
                    error: function(data) {
                        callback.call(this, data);
                    }
                });
            },

            saveAssociation: function(data, callback) {

				var url = PreSet.Constant.preRecocordUrl;

                $.ajax({
                    url:url,
                    dataType: 'json',
                    data: data,
                    method: 'get',
                    success: function(data) {
                        callback.call(this, data);
                    },
                    error: function(data) {
                        callback.call(this, data);
                    }
                });
            },

            //获取频道名称
            ipList: function(data, callback) {
                var url = PreSet.Constant.ipListUrl;

                $.ajax({
                    url: url,
                    type: 'get',
                    data: data,
                    dataType: 'json',
                    success: function(data) {
                        callback.call(this, data);
                    },
                    error: function(data) {
                        callback.call(this, data);
                    }
                });
            },

            //获取频道名称
            redirect: function(data, callback) {
                var options = {
                    url: '/api/redirect',
                    dataType: 'json',
                    data: data,
                    method: 'post',
                    success: function(data) {
                        callback.call(this, data);
                    },
                    error: function(data) {
                        callback.call(this, data);
                    }
                };
                Ancestor.Dao.ajax(options,'/redirect');
            }

        });
	}
);